﻿@{
    ViewBag.Title = "View1";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="/Scripts/jquery.edatagrid.js"></script>
<script src="/Scripts/gbh/product.js"></script>

<table id="dgProduct" title="Product" style="width:550px;height:250px"
        toolbar="#toolbarProduct" idField="id"
        rownumbers="true" fitColumns="true" singleSelect="true">
    <thead>
        <tr>
            <th field="id" width="50" editor="{type:'validatebox',options:{required:true}}">Product Code</th>
            <th field="name" width="50" editor="{type:'validatebox',options:{required:true}}">Product Name</th>
            <th field="isEnable" width="50" editor="{type:'checkbox',options:{on:'true',off:'false'}}">Enable</th>

        </tr>
    </thead>
</table>
<div id="toolbarProduct">
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="javascript:$('#dgProduct').edatagrid('addRow')">New</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="javascript:$('#dgProduct').edatagrid('destroyRow')">Destroy</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:$('#dgProduct').edatagrid('saveRow')">Save</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onclick="javascript:$('#dgProduct').edatagrid('cancelRow')">Cancel</a>
</div>
